import {getFolderList} from "@/api/system";

const player = {
    state: {
        fileList:[],
        isGetInfo:false
    },
    mutations: {
        setPlayerInfo(state,info){
            state.fileLis = info
            state.isGetInfo = !state.isGetInfo
        },
        setPlayerIsGetInfo(state){
            state.isGetInfo = !state.isGetInfo
        }
    },
    actions: {
        GetFolderList({commit}){
            return new Promise((resolve, reject) =>{
                getFolderList().then(res =>{
                    commit('setInfo',res.data);
                    resolve(res)
                }).catch(err=>{
                    console.log(err)
                    reject(err)
                })
            })
        }
    },
    getters:{

    }
}

export default player

